package ar.Location.Setting;

import android.content.Context;
import android.content.SharedPreferences;
import ar.Location.Localization.LocalizationHelper;

public class Settings {
	public static String LOCATION_SETTINGS = "LOCATION SETTINGS";
	public static String SETTING_MY_LATITUDE = "MY LATITUDE";
	public static String SETTING_MY_LONGITUDE = "MY LONGITUDE";
	public static String SETTING_CURRENT_LANGUAGE = "CURRENT LANGUAGE";

	public static void saveSettingLanguage(Context context) {
		if (context != null) {

			SharedPreferences settings = context.getSharedPreferences(
					LOCATION_SETTINGS, context.MODE_PRIVATE);
			SharedPreferences.Editor editor = settings.edit();
			editor.putBoolean(SETTING_CURRENT_LANGUAGE, LocalizationHelper.isEnglish);
			editor.commit();
		}
	}

	public static void loadSettingLanguage(Context context) {
		if (context != null) {
			SharedPreferences settings = context.getSharedPreferences(
					LOCATION_SETTINGS, context.MODE_PRIVATE);
			LocalizationHelper.isEnglish = settings.getBoolean(SETTING_CURRENT_LANGUAGE, true);
		}
	}
}
